<?php
namespace app\content\controller;
use think\admin\Controller;
use app\index\model\Banner as BannerModel;
use app\index\model\Crane as ModelCrane;
use app\index\model\DataUser;
use app\index\model\Role;
use think\admin\helper\QueryHelper;

class Crane  extends Controller{

     /**
     * @auth true
     * @menu true
     */
    public function index(){
        $search = input('get.');
        ModelCrane::mQuery()->layTable(function () {
            $this->title = '吊车列表';
        }, function (QueryHelper $query) use ($search) {
            // 数据列表搜索过滤
            $query->like('name');
        });
    }

     /**
     * @auth true
     * @menu true
     */
    public function edit()
    {
        $this->title = '编辑';
        // MyModel::mForm('form');
        $this->_form('crane','form');
    }

     /**
     * @auth true
     * @menu true
     */
    public function add()
    {
        $this->title = '添加';

        $this->_form('crane','form');
    }

    public function remove()
    {
        $this->_delete('crane');
    }


}